

import java.awt.*;
import java.awt.event.ActionListener;
import javax.swing.*;

public class FormResposta extends JPanel {
    private final JTextArea resposta;
    
    
    public FormResposta() {
        
        resposta = new JTextArea(3, 10);
        resposta.setLineWrap(true);
        resposta.setWrapStyleWord(true);
        resposta.setEditable(false);
        JScrollPane scrollPane = new JScrollPane(resposta);
        setPreferredSize(new Dimension(100, 100));
        this.add(scrollPane, BorderLayout.CENTER);
        
        this.setVisible(true);
    }
    
    public void setResposta(String resp){
        resposta.setText(resp);
    }
   
}